<style>
td {
	border-bottom:#13B1E4 1px solid;
	border-right:#13B1E4 1px solid;}

</style>

<!-- CONTENT START -->
<div id="content">

<!-- LEFT START -->
<?php
include ('themes/'.$this -> theme.'/left.php');
?>
<!-- LEFT END -->

<!-- RIGHT START -->
<div id="right">

<h2 class="right_heading">Images Manager</h2>
<div id="shop_anounce">
<?= $cmd; ?>
<form name="frm_upload" method="post" action="?page=addProductImages&sub=add" enctype="multipart/form-data">
<input type="hidden" name="productid" id="productid" value="<?= $pid; ?>"  />
<table width="650" border="0">
  <tr>
    <th bgcolor="#CCCCCC">Image Name</th>
    <th bgcolor="#CCCCCC">Image</th>
    <th bgcolor="#CCCCCC">Image fileName</th>
  </tr>
  
  <?php 
  	for($i=0; $i<=0; $i++)
	{
  		$src = '';
		$imageid = '';
		$imagename = '';
		$imageid = $arrProductImages[$i]['imageID'];
		$imagename = $arrProductImages[$i]['imageName'];		
  		if(!empty($imagename))
			{			
			$src = 'images/products/'.$imagename;
			}
		else
			{
			$src= "iconset/upload_90.jpeg";
			}
		?>
		
  <tr>   
	<td bgcolor="#CCCCCC">Image<?= $i+1; ?></td>
    <input type="hidden" name="imageid<?= $i+1; ?>" id="imageid<?= $i+1; ?>" value="<?= $imageid ?>" />
    <input type="hidden" name="existingimage<?= $i+1; ?>" id="existingimage<?= $i+1; ?>" value="<?= $imagename; ?>" />
    <td bgcolor="#CCCCCC"><img src=<?= $src; ?> alt="Image" border="0" width="90" />
    <table border="0">
    <tr>
	<td><a href="?page=addProductImages&sub=unloadImage&imageid=<?= $imageid; ?>&imagename=<?= $imagename; ?>&productid=<?= $pid; ?>">Delete Image</a></td>
		    </tr>
		    </table>
    </td>
    <td bgcolor="#CCCCCC"><input type="file" name="imagename<?= $i+1; ?>" id="imagename<?= $i+1; ?>" /></td>    
  </tr> 
  <?php } ?> 
  
  <tr>
    <td bgcolor="#CCCCCC">&nbsp;</td>
    <td bgcolor="#CCCCCC"><input type="submit" value="Save" /></td>
    <td bgcolor="#CCCCCC">&nbsp;</td>
  </tr>  
</table>
</form>
</div>
</div>
<!-- RIGHT END -->

<!-- Just to increase height automatically --><div id="height_increaser"></div>

</div>
<!-- CONTENT END -->
<div id="content_end"></div>